from apps.vadmin.op_drf.models import BaseModel
from django.db.models import CharField, IntegerField, TextField


class Kq_Price_infos(BaseModel):
    kqId = IntegerField(verbose_name='客户Id', blank=True, null=True)
    compName = CharField(max_length=255, verbose_name='公司名称')
    projectName = CharField(max_length=128, verbose_name='项目名称', blank=True, null=True)
    allItemTotalNum = IntegerField(verbose_name='项目总额', default=0, blank=True, null=True)
    allItemChinaNum = CharField(max_length=128, verbose_name='项目总额（大写）', blank=True, null=True)
    baseDiscount = CharField(max_length=32, verbose_name='基础折扣', blank=True, null=True)
    transDiscount = CharField(max_length=32, verbose_name='运费折扣', blank=True, null=True)
    totalDiscount = CharField(max_length=32, verbose_name='总折扣', blank=True, null=True)
    allItemTotalNum670 = CharField(max_length=32, verbose_name='670总价', blank=True, null=True)
    allTransportPrice = CharField(max_length=32, verbose_name='总运费', blank=True, null=True)
    dateTime = CharField(max_length=16, verbose_name='报价日期', blank=True, null=True)
    baseJson = TextField(verbose_name='JSON', blank=True, null=True)
    status = CharField(max_length=4, verbose_name='订单状态', blank=True, null=True)

    day = CharField(max_length=64, verbose_name='期望收获时间', blank=True, null=True)
    prodTime = CharField(max_length=8, verbose_name='货期', blank=True, null=True)
    logInfo = CharField(max_length=128, verbose_name='物流信息', blank=True, null=True)
    receiver = CharField(max_length=64, verbose_name='收件人', blank=True, null=True)
    recAddr = CharField(max_length=255, verbose_name='收件人地址', blank=True, null=True)
    recNumber = CharField(max_length=128, verbose_name='收件人电话', blank=True, null=True)

    class Meta:
        verbose_name = '客户报价中心表'
        verbose_name_plural = verbose_name

    def __str__(self):
        return f"{self.kqId}"
